FIND_PATH(BULLET_INCLUDE_DIR bullet/btBulletDynamicsCommon.h)
FIND_PATH(BULLET_LIBRARY_DIR BulletCollision.lib)
FIND_LIBRARY(BULLET_COLLISION_LIBRARY NAMES BulletCollision PATHS ${BULLET_LIBRARY_DIR})
FIND_LIBRARY(BULLET_DYNAMICS_LIBRARY NAMES BulletDynamics PATHS ${BULLET_LIBRARY_DIR})
FIND_LIBRARY(BULLET_MATH_LIBRARY NAMES LinearMath PATHS ${BULLET_LIBRARY_DIR})

IF(BULLET_INCLUDE_DIR AND BULLET_COLLISION_LIBRARY)
    SET(EXTERNAL_INCLUDE_DIR ${BULLET_INCLUDE_DIR})
    SET(EXTERNAL_LIBRARIES
        ${BULLET_COLLISION_LIBRARY} ${BULLET_DYNAMICS_LIBRARY}
        ${BULLET_MATH_LIBRARY}
    )
    
    SET(EXAMPLE_NAME osgbullet)
    SET(EXAMPLE_FILES osgbullet.cpp BulletInterface.cpp)
    START_EXAMPLE()
ENDIF(BULLET_INCLUDE_DIR AND BULLET_COLLISION_LIBRARY)
